import 'package:flutter/material.dart';

class SecondPage extends StatefulWidget{
  String contStr;

  SecondPage(this.contStr);
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _SecondPageSate(contStr);
  }

}

class _SecondPageSate extends State<SecondPage> {
  String contStr;

  _SecondPageSate(this.contStr);
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Scaffold(
      body: new Center(
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            new Container(
              margin: new EdgeInsets.fromLTRB(15, 0, 15, 0),
              color: Colors.blue,
              width: double.infinity,
              height: 50,
              child: new Text(contStr),
            ),
            new Container(
              color: Colors.blue,
              margin: new EdgeInsets.fromLTRB(15, 20, 15, 0),
              width: double.infinity,
              height: 50,
              child: new MaterialButton(
                onPressed:(){
                  Navigator.pop(context,"8");
                },
                child: new Text("点击退出"),),
            )
          ],
        ),
      ),
    );
  }

  void _finish() {
    Navigator.pop(context,"8");
  }
}